home *** CD-ROM | disk | FTP | other *** search
/ EuroCD 3 / EuroCD 3.iso / Programming / Amos / AMOSList-0497 / AMOSLIST / littleexamples.lha / DotTunnel.s < prev    next >
Encoding:
Text File  |  1995-01-25  |  1.1 KB  |  65 lines

  1.     opt    o+,w-
  2.     output    dh2:Dottunnel.o
  3.     IncDir    "dh1:Assembler/"
  4.     Include    "AMOS/|AMOSPro_Includes.s"
  5.  
  6.         rsreset
  7. O_DotStep    rs.w    1
  8. O_DotStart    rs.w    1
  9. O_MaxX        rs.w    1
  10. O_MaxY        rs.w    1
  11. O_SizeOf    rs.b    0
  12.  
  13. dottunn    lea    .base(pc),a2
  14.     move.l    (a3)+,d6        ;Stepping Rate
  15.     add.w    d6,d6
  16.     move.l    (a3)+,d0
  17.     add.w    d0,d0
  18.     and.w    #$3FF,d0
  19.     move.w    d0,O_DotStart(a2)    ;Starting Angle
  20.     move.w    d0,d7
  21.     move.l    ScOnAd(a5),a0
  22.     move.w    EcTx(a0),O_MaxX(a2)
  23.     move.w    EcTy(a0),O_MaxY(a2)
  24.     move.l    (a3)+,d0        ;Bitplane
  25.     add.w    d0,d0
  26.     add.w    d0,d0
  27.     move.l    (a0,d0.w),a1
  28.     move.l    (a3)+,d5        ;My
  29.     move.l    (a3)+,d4        ;Mx
  30.     movem.l    a3-a4,-(sp)
  31.     move.l    (a3)+,a0        ;Sinebase
  32.     move.l    (a3)+,a4        ;Y-Table
  33.     move.l    a0,a3
  34. .loop    move.w    (a3,d7.w),d3
  35.     move.w    d7,d0
  36.     add.w    #$100,d0
  37.     and.w    #$3FF,d0
  38.     move.w    (a3,d0.w),d2
  39.     add.w    d5,d3
  40.     bmi.s    .nodot
  41.     add.w    d4,d2
  42.     bmi.s    .nodot
  43.     cmp.w    O_MaxY(a2),d3
  44.     bge.s    .nodot
  45.     cmp.w    O_MaxX(a2),d2
  46.     bge.s    .nodot
  47.     move.w    d2,d0
  48.     lsr.w    #3,d0
  49.     and.b    #7,d2
  50.     not.b    d2
  51.     move.l    a1,a0
  52.     moveq.l    #0,d1
  53.     add.w    d3,d3
  54.     move.w    (a4,d3.w),d1
  55.     add.l    d1,a0
  56.     bset    d2,(a0,d0.w)
  57. .nodot    add.w    d6,d7
  58.     and.w    #$3FF,d7
  59.     cmp.w    O_DotStart(a2),d7
  60.     bne.s    .loop
  61.     movem.l    (sp)+,a3-a4
  62.     rts
  63.  
  64. .base    ds.b    O_SizeOf
  65.